<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>添加logo</title>
    <meta name="keywords" content="">
    <meta name="description" content="">

    <include file="Index/common_css"/>
    <link href="__PUBLIC__/admin/css/plugins/iCheck/custom.css" rel="stylesheet">
    <!--<script type="text/javascript" charset="utf-8" src="__PUBLIC__/common/js/ueditor/ueditor.config.js"></script>-->
    <!--<script type="text/javascript" charset="utf-8" src="__PUBLIC__/common/js/ueditor/ueditor.all.min.js"> </script>-->
    <!--<script type="text/javascript" charset="utf-8" src="__PUBLIC__/common/js/ueditor/lang/zh-cn/zh-cn.js"></script>-->
    <style>
        .Validform_checktip{padding-top:5px;display: inline-block;color:red;}
    </style>
</head>
<body class="gray-bg">
    <div class="wrapper wrapper-content animated fadeInRight">
        <div class="row">
            <div class="col-sm-12">
                <div class="ibox float-e-margins">
                    <div class="ibox-title">
                        <h5>修改logo</h5>
                    </div>
                    <div class="ibox-content">
                        <form class="form-horizontal" id="addFrom" action="__URL__/updateLogo" method="post" enctype="multipart/form-data">
                            <input type="hidden" name="id" value="{$msg.id}"/>
                            <div class="form-group">
                                <label class="col-sm-3 control-label">网站名称(中文)：</label>
                                <div class="col-sm-8">
                                    <input name="web_name"  class="form-control" value="{$msg.web_name}" type="text"  datatype="*" placeholder="">
                                </div>
                                <i class="Validform_checktip Hui-iconfont">*</i>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-3 control-label">网站名称(英文)：</label>
                                <div class="col-sm-8">
                                    <input name="web_name_en"  class="form-control" value="{$msg.web_name_en}" type="text"  datatype="*" placeholder="">
                                </div>
                                <i class="Validform_checktip Hui-iconfont">*</i>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-3 control-label">网站logo：</label>
                                <div class="col-sm-8">
                                    <!--<input type="file" name="logo" required="" aria-required="true">-->
                                    <label>
                                        <img width="300px" src="__ROOT__/{$msg.logo}" alt="点击重新上传" title="点击重新上传"/>
                                        <input type="file" style="display: none;" name="logo" onchange="uploadFile(this)">
                                    </label>
                                </div>
                                <i class="Validform_checktip Hui-iconfont">*</i>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-3 control-label">ico：</label>
                                <div class="col-sm-8">
                                    <!--<input type="file" name="ico" required="" aria-required="true">-->
                                    <label>
                                        <img width="30px" src="__ROOT__/{$msg.ico}" alt="点击重新上传" title="点击重新上传"/>
                                        <input type="file" style="display: none;" name="ico" onchange="uploadFile(this)">
                                    </label>
                                </div>
                                <i class="Validform_checktip Hui-iconfont">*</i>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-3 control-label">CRM logo：</label>
                                <div class="col-sm-8">
                                    <!--<input type="file" name="crm_logo" required="" aria-required="true">-->
                                    <label>
                                        <img width="100px" src="__ROOT__/{$msg.crm_logo}" alt="点击重新上传" title="点击重新上传"/>
                                        <input type="file" style="display: none;" name="crm_logo" onchange="uploadFile(this)">
                                    </label>
                                </div>
                                <i class="Validform_checktip Hui-iconfont">*</i>
                            </div>

                            <div class="form-group">
                                <div class="col-sm-offset-3 col-sm-8">
                                    <button class="btn btn-sm btn-info" id="add-btn" type="submit">添 加</button>
                                </div>
                            </div>
                        </form>
                    </div>
                </div>
            </div>
        </div>
    </div>

    <!-- 全局js -->
    <include file="Index/common_js"/>
    <!-- 自定义js -->
    <script src="js/content.js?v=1.0.0"></script>
    <!-- iCheck -->
    <script src="__PUBLIC__/admin/js/plugins/iCheck/icheck.min.js"></script>
    <script>
        var editor;
        $(document).ready(function () {
            $('.i-checks').iCheck({
                checkboxClass: 'icheckbox_square-green',
                radioClass: 'iradio_square-green',
            });
            //editor=UE.getEditor('content');
        });
        function uploadFile(obj){
            oFReader = new FileReader(), rFilter = /^(?:image\/bmp|image\/cis\-cod|image\/gif|image\/ief|image\/jpeg|image\/jpeg|image\/jpeg|image\/pipeg|image\/png|image\/svg\+xml|image\/tiff|image\/x\-cmu\-raster|image\/x\-cmx|image\/x\-icon|image\/x\-portable\-anymap|image\/x\-portable\-bitmap|image\/x\-portable\-graymap|image\/x\-portable\-pixmap|image\/x\-rgb|image\/x\-xbitmap|image\/x\-xpixmap|image\/x\-xwindowdump)$/i;
            oFReader.onload = function (oFREvent) {
                $(obj).prev('img').attr('src',oFREvent.target.result);
            };
            //if (document.getElementById("credential").files.length === 0) { return; }
            if (obj.files.length === 0) { return; }
            //var oFile = document.getElementById("credential").files[0];
            var oFile = obj.files[0];
            if (!rFilter.test(oFile.type)) { alert("You must select a valid image file!"); return; }
            oFReader.readAsDataURL(oFile);
        }
    </script>
</body>

</html>
